package com.xinyan.plc;

import com.github.xingshuangs.iot.common.enums.EDataType;
import com.github.xingshuangs.iot.protocol.s7.serializer.S7Variable;
import lombok.Data;

import java.io.Serializable;

@Data
public class RepeatParam implements Serializable {

    /**
     * smart 200 VB数据必须已字节数组形式读写
     */
    private byte vb500_0;

    private byte vb501_0;

    private byte vb502_0;

    private byte vb503_0;

    public void getRealVal() {
        this.vb500_0 = this.vb500[0];
        this.vb501_0 = this.vb501[0];
        this.vb502_0 = this.vb502[0];
        this.vb503_0 = this.vb503[0];
    }


    /**
     * 自动模式下运行持续时间-分钟
     */
    @S7Variable(address = "vb500", type = EDataType.BYTE)
    private byte[] vb500;

    /**
     * 自动模式下运行持续时间-秒
     */
    @S7Variable(address = "vb501", type = EDataType.BYTE)
    private byte[] vb501;

    /**
     * 自动模式下停止持续时间-分钟
     */
    @S7Variable(address = "vb502", type = EDataType.BYTE)
    private byte[] vb502;

    /**
     * 自动模式下停止持续时间-秒
     */
    @S7Variable(address = "vb503", type = EDataType.BYTE)
    private byte[] vb503;

    /**
     * 星期日
     */
    @S7Variable(address = "v510.0", type = EDataType.BOOL)
    private boolean v5100;

    /**
     * 星期一
     */
    @S7Variable(address = "v510.1", type = EDataType.BOOL)
    private boolean v5101;

    /**
     * 星期二
     */
    @S7Variable(address = "v510.2", type = EDataType.BOOL)
    private boolean v5102;

    /**
     * 星期三
     */
    @S7Variable(address = "v510.3", type = EDataType.BOOL)
    private boolean v5103;

    /**
     * 星期四
     */
    @S7Variable(address = "v510.4", type = EDataType.BOOL)
    private boolean v5104;

    /**
     * 星期五
     */
    @S7Variable(address = "v510.5", type = EDataType.BOOL)
    private boolean v5105;

    /**
     * 星期六
     */
    @S7Variable(address = "v510.6", type = EDataType.BOOL)
    private boolean v5106;

    /**
     * 循环1:是否开启标记
     */
    @S7Variable(address = "v511.0", type = EDataType.BOOL)
    private boolean v5110;

    /**
     * 循环2:是否开启标记
     */
    @S7Variable(address = "v511.1", type = EDataType.BOOL)
    private boolean v5111;

    /**
     * 循环3:是否开启标记
     */
    @S7Variable(address = "v511.2", type = EDataType.BOOL)
    private boolean v5112;

    /**
     * 循环4:是否开启标记
     */
    @S7Variable(address = "v511.3", type = EDataType.BOOL)
    private boolean v5113;

    /**
     * 循环1：开始小时
     */
    @S7Variable(address = "vw512", type = EDataType.UINT16)
    private int vw512;

    /**
     * 循环1：结束小时
     */
    @S7Variable(address = "vw514", type = EDataType.UINT16)
    private int vw514;

    /**
     * 循环2：开始小时
     */
    @S7Variable(address = "vw516", type = EDataType.UINT16)
    private int vw516;

    /**
     * 循环2：结束小时
     */
    @S7Variable(address = "vw518", type = EDataType.UINT16)
    private int vw518;

    /**
     * 循环3：开始小时
     */
    @S7Variable(address = "vw520", type = EDataType.UINT16)
    private int vw520;

    /**
     * 循环3：结束小时
     */
    @S7Variable(address = "vw522", type = EDataType.UINT16)
    private int vw522;

    /**
     * 循环4：开始小时
     */
    @S7Variable(address = "vw524", type = EDataType.UINT16)
    private int vw524;

    /**
     * 循环4：结束小时
     */
    @S7Variable(address = "vw526", type = EDataType.UINT16)
    private int vw526;

    /**
     * 循环1：开始分钟
     */
    @S7Variable(address = "vw528", type = EDataType.UINT16)
    private int vw528;

    /**
     * 循环1：结束分钟
     */
    @S7Variable(address = "vw530", type = EDataType.UINT16)
    private int vw530;

    /**
     * 循环2：开始分钟
     */
    @S7Variable(address = "vw532", type = EDataType.UINT16)
    private int vw532;

    /**
     * 循环2：结束分钟
     */
    @S7Variable(address = "vw534", type = EDataType.UINT16)
    private int vw534;

    /**
     * 循环3：开始分钟
     */
    @S7Variable(address = "vw536", type = EDataType.UINT16)
    private int vw536;

    /**
     * 循环3：结束分钟
     */
    @S7Variable(address = "vw538", type = EDataType.UINT16)
    private int vw538;

    /**
     * 循环4：开始分钟
     */
    @S7Variable(address = "vw540", type = EDataType.UINT16)
    private int vw540;

    /**
     * 循环4：结束分钟
     */
    @S7Variable(address = "vw542", type = EDataType.UINT16)
    private int vw542;

}
